//
//  NNCalendarScroView.h
//  TestObjectProduct
//
//  Created by fangshufeng on 16/9/30.
//  Copyright © 2016年 fangshufeng. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger, NNCalendarScroViewBeginDay) {
    NNCalendarScroViewBeginDaySunday = 1,     //周日
    NNCalendarScroViewBeginDayMonday, //周一
};

@class NNCalendarScroView,NNCalendarModel;

@protocol NNCalendarScroViewDelegate <NSObject>

@optional

//滑动完输出年月
- (void)calendarScroView:(NNCalendarScroView *)calendarScroView year:(NSString *)year month:(NSString *)month;
//点击事件
- (void)calendarScroView:(NNCalendarScroView *)calendarScroView itemDid:(NNCalendarModel *)item;
@end

@interface NNCalendarScroView : UIView

//使用默认初始化 默认从周日开始
- (instancetype)initWithDefaultContent;
//个性化初始化cell 默认从周日开始
- (instancetype)initWithNibNameStr:(NSString *)nibWithNibNameStr  cellWithReuseIdentifier:(NSString *)cellWithReuseIdentifier;

//个性化初始化cell 默认从周日开始
- (instancetype)initWithRegisterClassName:(NSString *)className  cellWithReuseIdentifier:(NSString *)cellWithReuseIdentifier;


//使用默认初始化 从周一开始
- (instancetype)initWithDefaultContentBeginCalendar:(NNCalendarScroViewBeginDay)calendarScroViewBeginDay;
//个性化初始化  从周一开始
- (instancetype)initWithNibNameStr:(NSString *)nibWithNibNameStr  cellWithReuseIdentifier:(NSString *)cellWithReuseIdentifier calendar:(NNCalendarScroViewBeginDay)calendarScroViewBeginDay;

//个性化初始化  从周一开始
- (instancetype)initWithRegisterClassName:(NSString *)className  cellWithReuseIdentifier:(NSString *)cellWithReuseIdentifier calendar:(NNCalendarScroViewBeginDay)calendarScroViewBeginDay;

/**delegate*/
@property(nonatomic, weak) id<NNCalendarScroViewDelegate> delegate;
/**eg: 2016-09*/
@property(nonatomic, copy) NSString *needMonth;

/**外部传入的时间格式 默认是yyyy-MM*/
@property(nonatomic, copy) NSString *dateFormat;

/**设置日历头部的颜色*/
@property(nonatomic, strong) UIColor *headViewColor;

/**日历起始计算索引 日: 1 一 :2 ...  默认是1*/
@property(nonatomic, assign) NNCalendarScroViewBeginDay calendarScroViewBeginDay ;

/**通过xib加载cell nibWithNibName*/
@property(nonatomic, copy,readonly) NSString *nibWithNibNameStr;
/**通过代码加载cell registerClass*/
@property(nonatomic, copy,readonly) NSString *registerClassName;

/**重用标识CellWithReuseIdentifier*/
@property(nonatomic, copy,readonly) NSString *cellWithReuseIdentifier;
@end
